package com.yiyahui.project.erp.service.impl;

import java.util.List;
import com.yiyahui.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiyahui.project.erp.mapper.YiyaDiagnoseRunningMapper;
import com.yiyahui.project.erp.domain.YiyaDiagnoseRunning;
import com.yiyahui.project.erp.service.IYiyaDiagnoseRunningService;

/**
 * 看诊记录Service业务层处理
 * 
 * @author yiyahui
 * @date 2020-05-19
 */
@Service
public class YiyaDiagnoseRunningServiceImpl implements IYiyaDiagnoseRunningService 
{
    @Autowired
    private YiyaDiagnoseRunningMapper yiyaDiagnoseRunningMapper;

    /**
     * 查询看诊记录
     * 
     * @param id 看诊记录ID
     * @return 看诊记录
     */
    @Override
    public YiyaDiagnoseRunning selectYiyaDiagnoseRunningById(Long id)
    {
        return yiyaDiagnoseRunningMapper.selectYiyaDiagnoseRunningById(id);
    }

    /**
     * 查询看诊记录列表
     * 
     * @param yiyaDiagnoseRunning 看诊记录
     * @return 看诊记录
     */
    @Override
    public List<YiyaDiagnoseRunning> selectYiyaDiagnoseRunningList(YiyaDiagnoseRunning yiyaDiagnoseRunning)
    {
        return yiyaDiagnoseRunningMapper.selectYiyaDiagnoseRunningList(yiyaDiagnoseRunning);
    }

    /**
     * 新增看诊记录
     * 
     * @param yiyaDiagnoseRunning 看诊记录
     * @return 结果
     */
    @Override
    public int insertYiyaDiagnoseRunning(YiyaDiagnoseRunning yiyaDiagnoseRunning)
    {
        yiyaDiagnoseRunning.setCreateTime(DateUtils.getNowDate());
        return yiyaDiagnoseRunningMapper.insertYiyaDiagnoseRunning(yiyaDiagnoseRunning);
    }

    /**
     * 修改看诊记录
     * 
     * @param yiyaDiagnoseRunning 看诊记录
     * @return 结果
     */
    @Override
    public int updateYiyaDiagnoseRunning(YiyaDiagnoseRunning yiyaDiagnoseRunning)
    {
        yiyaDiagnoseRunning.setUpdateTime(DateUtils.getNowDate());
        return yiyaDiagnoseRunningMapper.updateYiyaDiagnoseRunning(yiyaDiagnoseRunning);
    }

    /**
     * 批量删除看诊记录
     * 
     * @param ids 需要删除的看诊记录ID
     * @return 结果
     */
    @Override
    public int deleteYiyaDiagnoseRunningByIds(Long[] ids)
    {
        return yiyaDiagnoseRunningMapper.deleteYiyaDiagnoseRunningByIds(ids);
    }

    /**
     * 删除看诊记录信息
     * 
     * @param id 看诊记录ID
     * @return 结果
     */
    @Override
    public int deleteYiyaDiagnoseRunningById(Long id)
    {
        return yiyaDiagnoseRunningMapper.deleteYiyaDiagnoseRunningById(id);
    }
}
